from django.contrib import admin

# Register your models here.
from django.contrib import admin
from .models import AdminLog, SystemSetting

@admin.register(AdminLog)
class AdminLogAdmin(admin.ModelAdmin):
    list_display = ['admin', 'action', 'description', 'ip_address', 'created_at']
    list_filter = ['action', 'created_at']
    search_fields = ['admin__username', 'description']
    readonly_fields = ['admin', 'action', 'description', 'ip_address', 'created_at']
    date_hierarchy = 'created_at'

@admin.register(SystemSetting)
class SystemSettingAdmin(admin.ModelAdmin):
    list_display = ['key', 'value', 'description', 'updated_at']
    list_editable = ['value']
    search_fields = ['key', 'description']